package com.itshops.service.impl;

import com.itshops.dao.TypeDao;
import com.itshops.dao.impl.TypeDaoImpl;
import com.itshops.entity.Type;
import com.itshops.service.TypeService;

import java.sql.SQLException;
import java.util.List;

public class TypeServiceImpl implements TypeService {
    TypeDao typeDao=new TypeDaoImpl();

    /**
     * 返回所有商品类别
     * @return 类别集合
     * @throws SQLException 异常
     */
    @Override
    public List<Type> findAll() throws SQLException {
        List<Type> types = typeDao.selectAll();
        return types;
    }
}
